
<!-- 页头 -->
<page-header-wrapper [logo]="logo" [title]="textStatus" [content]="headerContent">
  <ng-template #logo>
    <button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
      <i nz-icon nzType="left" nzTheme="outline"></i>
    </button>
  </ng-template>
  <ng-template #headerContent>
    <div nz-row style="display: flex; justify-content: end;">
      <div nz-col *ngIf="isUpdate">
        <button  nz-button nzSize="default" nzType="default" (click)="cancel()">取消</button>
        <button class="ml-lg" nz-button nzSize="default" nzType="primary" (click)="save()">保存</button>
      </div>
    </div>
  </ng-template>
</page-header-wrapper>


<nz-card >
  <sf #sf [schema]="schema"  [formData]="sfdata" [button]="'none'" [ui]="ui"></sf>
</nz-card>

<nz-card>
  <div nz-col nzSpan="20" style="overflow: scroll">
    <nz-card class="card-height" *ngIf="!isUpdate">
      
      <div [innerHTML]="detailList?.templateContent | safehtml"></div>
   
    </nz-card>

    <nz-card class="card-height" *ngIf="isUpdate">
    
      <div nz-row nzGutter="8">
        <div class="title"  style="width: 100%; ">
          <input style="width: 100%;"  nz-input placeholder="请输入合同标题" [(ngModel)]="detailList.templateName" />
        </div>

        <div nz-col nzSpan="24" style="margin-top: 15px;">
          <sf #sf2 mode="edit"  [formData]="sfdata2" [schema]="schema2" [ui]="{ '*': { spanLabelFixed: 10, grid: { span: 24 }} }"
            button="none"> </sf>
          <sf #sf3 mode="edit"  [formData]="sfdata3" [schema]="schema3" [ui]="ui3"
            button="none"> </sf>
        </div>
      </div>
      <div>
        <button style="float: right;" class="ml-lg" nz-button nzSize="default" nzType="primary" (click)="downtTemplate()">下载模板</button>
       </div>
  
    </nz-card>
  </div>
</nz-card>
<!-- <div class="mb-md save-btn">
  <button nz-button nzSize="large" nzType="default" (click)="cancel()">取消</button>
  <button class="ml-lg" nz-button nzSize="large" nzType="primary" (click)="save()">保存</button>
</div> -->